package com.tbit.manager.api;

import com.tbit.manager.api.dto.StudentAuthApplyDTO;
import com.tbit.manager.enums.ApiConstants;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 学生认证 openfeign接口
 *
 * @author ：zhangtianyou
 * @since 2024/11/22
 */
@FeignClient(name = ApiConstants.NAME)
public interface StudentAuthApplyApi {
    String PREFIX = ApiConstants.PREFIX + "/studentAuth";

    /**
     * 审核学生认证
     *
     * @param studentAuthApplyDTO 认证信息
     */
    @PostMapping(value = PREFIX + "/verifyStudentAuth", consumes = "application/json")
    void editStudentAuth(@RequestBody StudentAuthApplyDTO studentAuthApplyDTO);

    /**
     * 清除学生认证
     *
     * @param userId 用户id
     */
    @GetMapping(PREFIX + "/clearAuth")
    void clearAuth(@RequestParam("userId") Integer userId);

    /**
     * 查询学生认证情况
     *
     * @param userId 用户id
     */
    @GetMapping(value = PREFIX + "/getStudentApplyById", produces = "application/json")
    StudentAuthApplyDTO getStudentApplyById(@RequestParam("userId") Integer userId);

}
